/*
Navicat MySQL Data Transfer

Source Server         : localhost
Source Server Version : 50547
Source Host           : localhost:3306
Source Database       : rbac

Target Server Type    : MYSQL
Target Server Version : 50547
File Encoding         : 65001

Date: 2016-05-30 16:00:33
*/

SET FOREIGN_KEY_CHECKS=0;

-- ----------------------------
-- Table structure for admin_users
-- ----------------------------
DROP TABLE IF EXISTS `admin_users`;
CREATE TABLE `admin_users` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `password` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `remember_token` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `users_email_unique` (`email`)
) ENGINE=MyISAM AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- ----------------------------
-- Records of admin_users
-- ----------------------------
INSERT INTO `admin_users` VALUES ('1', 'admin', 'admin@admin.com', '$2y$10$66x80Mfjhj4dLCRtmvmSHOPDDtoXoSjJ5zo92nfFqmcPPX7Go/yoW', '4XLGXPgHrWd2eFhm2gHTEV7XWWuyAVMxBGFbxfyifswjPmqm7OKygLrKw21W', '2016-05-25 05:56:33', '2016-05-28 07:08:19');
INSERT INTO `admin_users` VALUES ('2', 'test', 'test@admin.com', '$2y$10$66x80Mfjhj4dLCRtmvmSHOPDDtoXoSjJ5zo92nfFqmcPPX7Go/yoW', '5zYwJbEED3uuKdZh9JXARhEQzl6AISt3BSq2AhdU6ttYHwaqWVuCEQdmL0ZV', '2016-05-25 05:56:33', '2016-05-25 08:34:44');

-- ----------------------------
-- Table structure for migrations
-- ----------------------------
DROP TABLE IF EXISTS `migrations`;
CREATE TABLE `migrations` (
  `migration` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `batch` int(11) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- ----------------------------
-- Records of migrations
-- ----------------------------
INSERT INTO `migrations` VALUES ('2014_10_12_000000_create_users_table', '1');
INSERT INTO `migrations` VALUES ('2014_10_12_100000_create_password_resets_table', '1');
INSERT INTO `migrations` VALUES ('2016_05_25_054817_entrust_setup_tables', '1');

-- ----------------------------
-- Table structure for password_resets
-- ----------------------------
DROP TABLE IF EXISTS `password_resets`;
CREATE TABLE `password_resets` (
  `email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `token` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  KEY `password_resets_email_index` (`email`),
  KEY `password_resets_token_index` (`token`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- ----------------------------
-- Records of password_resets
-- ----------------------------

-- ----------------------------
-- Table structure for permissions
-- ----------------------------
DROP TABLE IF EXISTS `permissions`;
CREATE TABLE `permissions` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `display_name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `description` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `cid` int(10) unsigned DEFAULT NULL,
  `icon` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `permissions_name_unique` (`name`)
) ENGINE=MyISAM AUTO_INCREMENT=19 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- ----------------------------
-- Records of permissions
-- ----------------------------
BEGIN;
INSERT INTO `permissions` VALUES ('5', 'admin.user.manage', '用户管理', '', '2016-05-27 09:14:31', '2016-05-30 12:25:59', '0', 'fa-users'),
('6', 'admin.permission.index', '权限列表', '', '2016-05-27 09:15:01', '2016-05-28 04:35:05', '5', null),
('7', 'admin.permission.create', '添加权限', '', '2016-05-27 09:15:22', '2016-05-27 09:15:22', '5', null),
('8', 'admin.permission.edit', '修改权限', '', '2016-05-27 09:15:34', '2016-05-27 09:15:34', '5', null),
('9', 'admin.permission.destroy ', '删除权限', '', '2016-05-27 09:15:56', '2016-05-27 09:15:56', '5', null),
('11', 'admin.user.index', '用户列表', '', '2016-05-27 10:55:55', '2016-05-27 10:55:55', '5', null),
('12', 'admin.user.create', '添加用户', '', '2016-05-27 10:56:10', '2016-05-27 10:56:10', '5', null),
('13', 'admin.user.edit', '编辑用户', '', '2016-05-27 10:56:26', '2016-05-27 10:56:26', '5', null),
('14', 'admin.user.destroy', '删除用户', '', '2016-05-27 10:56:44', '2016-05-27 10:56:44', '5', null),
('15', 'admin.role.index', '角色列表', '', '2016-05-27 10:57:35', '2016-05-27 10:57:35', '5', null),
('16', 'admin.role.create', '添加角色', '', '2016-05-27 10:57:53', '2016-05-27 10:57:53', '5', null),
('17', 'admin.role.edit', '编辑角色', '', '2016-05-27 10:58:13', '2016-05-27 10:58:13', '5', null),
('18', 'admin.role.destroy', '删除角色', '', '2016-05-27 10:58:48', '2016-05-27 10:58:48', '5', null),
('19', 'admin.wechat.user.manage', '微信用户管理', '', '2016-05-27 10:58:48', '2016-05-27 10:58:48', '0', 'fa-users'),
('20', 'admin.wechat.user.index', '微信用户列表', '', '2016-05-27 10:58:48', '2016-05-27 10:58:48', '19', null),
('21', 'admin.build.manage', '楼盘管理', '', '2016-05-27 10:58:48', '2016-11-14 14:58:26', '0', 'fa-building'),
('22', 'admin.build.index', '楼盘列表', '', '2016-05-27 10:58:48', '2016-05-27 10:58:48', '21', null),
('23', 'admin.areas.index', '地区列表', '', '2016-05-27 10:58:48', '2016-05-27 10:58:48', '21', null),
('24', 'admin.build.create', '添加楼盘', '', '2016-05-27 10:58:48', '2016-05-27 10:58:48', '21', null),
('25', 'admin.upload.uploadimg', '上传图片', '', '2016-10-17 17:58:53', '2016-10-17 17:58:53', '21', null),
('26', 'admin.build.edit', '楼盘修改', '', '2016-10-18 14:21:50', '2016-10-18 14:21:50', '21', null),
('27', 'admin.areas.create', '添加地区', '', '2016-10-18 15:35:07', '2016-10-18 15:35:19', '21', null),
('28', 'admin.areas.edit', '修改地区', '', '2016-10-18 15:51:17', '2016-10-18 15:51:17', '21', null),
('29', 'admin.buildtype.index', '楼盘类型列表', '', '2016-10-18 16:11:02', '2016-10-18 16:11:02', '21', null),
('30', 'admin.buildtype.edit', '修改楼盘类型', '', '2016-10-18 16:27:46', '2016-10-18 16:27:57', '21', null),
('31', 'admin.buildtype.create', '添加楼盘类型', '', '2016-10-18 16:35:44', '2016-10-18 16:35:44', '21', null),
('32', 'admin.prize.manage', '奖品管理', '', '2016-10-19 16:47:53', '2016-11-14 14:59:26', '0', 'fa-suitcase'),
('33', 'admin.prize.index', '奖品列表', '', '2016-10-19 16:48:41', '2016-10-19 18:01:19', '32', null),
('34', 'admin.prize.create', '添加奖品', '', '2016-10-19 17:07:44', '2016-10-19 18:01:26', '32', null),
('35', 'admin.prize.edit', '修改奖品', '', '2016-10-19 17:26:34', '2016-10-19 18:01:31', '32', null),
('36', 'admin.prizerank.index', '等级列表', '', '2016-10-19 18:01:57', '2016-10-19 18:01:57', '32', null),
('37', 'admin.prizerank.edit', '修改等级', '', '2016-10-19 18:06:09', '2016-10-19 18:06:09', '32', null),
('38', 'admin.prizerank.create', '添加等级', '', '2016-10-19 18:06:58', '2016-10-19 18:06:58', '32', null),
('41', 'admin.build.edit.detail', '修改楼盘详细', '', '2016-11-10 18:59:39', '2016-11-10 18:59:39', '21', null),
('40', 'admin.build.create.detail', '添加楼盘详细', '', '2016-11-10 18:29:59', '2016-11-10 18:29:59', '21', null),
('42', 'admin.face.manage', '投票管理', '', '2016-11-14 15:01:05', '2016-11-14 15:01:19', '0', 'fa-sliders'),
('43', 'admin.face.index', '投票等级列表', '', '2016-11-14 15:01:58', '2016-11-14 15:01:58', '42', null),
('44', 'admin.face.create', '添加投票等级', '', '2016-11-14 15:02:41', '2016-11-14 15:02:41', '42', null),
('45', 'admin.face.edit', '修改投票等级', '', '2016-11-14 15:03:15', '2016-11-14 15:03:15', '42', null),
('46', 'admin.buildprice.index', '楼盘价格列表', '', '2016-11-14 15:04:22', '2016-11-14 15:04:22', '21', null),
('47', 'admin.buildprice.create', '添加价格区间', '', '2016-11-14 15:04:35', '2016-11-14 15:04:35', '21', null),
('48', 'admin.buildprice.edit', '修改价格区间', '', '2016-11-14 15:04:56', '2016-11-14 15:04:56', '21', null),
('49', 'admin.prizelog.index', '中奖记录', '', '2016-11-14 15:05:36', '2016-11-14 15:05:36', '32', null),
('50', 'admin.prizelog.creat', '添加中奖记录', '', '2016-11-14 15:05:59', '2016-11-14 15:05:59', '32', null),
('51', 'admin.prizelog.edit', '修改中奖记录', '', '2016-11-14 15:06:21', '2016-11-14 15:06:21', '32', null);
COMMIT;

-- ----------------
--INSERT INTO `permissions` VALUES ('5', 'admin.user.manage', '用户管理', '', '2016-05-27 09:14:31', '2016-05-30 12:25:59', '0', 'fa-users');
--INSERT INTO `permissions` VALUES ('6', 'admin.permission.index', '权限列表', '', '2016-05-27 09:15:01', '2016-05-28 04:35:05', '5', null);
--INSERT INTO `permissions` VALUES ('7', 'admin.permission.create', '添加权限', '', '2016-05-27 09:15:22', '2016-05-27 09:15:22', '5', null);
--INSERT INTO `permissions` VALUES ('8', 'admin.permission.edit', '修改权限', '', '2016-05-27 09:15:34', '2016-05-27 09:15:34', '5', null);
--INSERT INTO `permissions` VALUES ('9', 'admin.permission.destroy ', '删除权限', '', '2016-05-27 09:15:56', '2016-05-27 09:15:56', '5', null);
--INSERT INTO `permissions` VALUES ('11', 'admin.user.index', '用户列表', '', '2016-05-27 10:55:55', '2016-05-27 10:55:55', '5', null);
--INSERT INTO `permissions` VALUES ('12', 'admin.user.create', '添加用户', '', '2016-05-27 10:56:10', '2016-05-27 10:56:10', '5', null);
--INSERT INTO `permissions` VALUES ('13', 'admin.user.edit', '编辑用户', '', '2016-05-27 10:56:26', '2016-05-27 10:56:26', '5', null);
--INSERT INTO `permissions` VALUES ('14', 'admin.user.destroy', '删除用户', '', '2016-05-27 10:56:44', '2016-05-27 10:56:44', '5', null);
--INSERT INTO `permissions` VALUES ('15', 'admin.role.index', '角色列表', '', '2016-05-27 10:57:35', '2016-05-27 10:57:35', '5', null);
--INSERT INTO `permissions` VALUES ('16', 'admin.role.create', '添加角色', '', '2016-05-27 10:57:53', '2016-05-27 10:57:53', '5', null);
--INSERT INTO `permissions` VALUES ('17', 'admin.role.edit', '编辑角色', '', '2016-05-27 10:58:13', '2016-05-27 10:58:13', '5', null);
--INSERT INTO `permissions` VALUES ('18', 'admin.role.destroy', '删除角色', '', '2016-05-27 10:58:48', '2016-05-27 10:58:48', '5', null);
--INSERT INTO `permissions` VALUES ('19', 'admin.wechat.user.manage', '微信用户管理', '', '2016-05-27 10:58:48', '2016-05-27 10:58:48', '0', 'fa-users');
--INSERT INTO `permissions` VALUES ('20', 'admin.wechat.user.index', '微信用户列表', '', '2016-05-27 10:58:48', '2016-05-27 10:58:48', '19', null);

--INSERT INTO `permissions` VALUES ('21', 'admin.build.manage', '楼盘管理', '', '2016-05-27 10:58:48', '2016-05-27 10:58:48', '0', null);
--INSERT INTO `permissions` VALUES ('22', 'admin.build.index', '楼盘列表', '', '2016-05-27 10:58:48', '2016-05-27 10:58:48', '21', null);
--INSERT INTO `permissions` VALUES ('23', 'admin.areas.index', '地区列表', '', '2016-05-27 10:58:48', '2016-05-27 10:58:48', '21', null);
--INSERT INTO `permissions` VALUES ('24', 'admin.build.create', '添加楼盘', '', '2016-05-27 10:58:48', '2016-05-27 10:58:48', '21', null);

--INSERT INTO `permissions` VALUES ('25', 'admin.upload.uploadimg', '上传图片', '', '2016-10-17 17:58:53', '2016-10-17 17:58:53', '21', null);
--INSERT INTO `permissions` VALUES ('26', 'admin.build.edit', '楼盘修改', '', '2016-10-18 14:21:50', '2016-10-18 14:21:50', '21', null);
--INSERT INTO `permissions` VALUES ('27', 'admin.areas.create', '添加地区', '', '2016-10-18 15:35:07', '2016-10-18 15:35:19', '21', null);
--INSERT INTO `permissions` VALUES ('28', 'admin.areas.edit', '修改地区', '', '2016-10-18 15:51:17', '2016-10-18 15:51:17', '21', null);
--INSERT INTO `permissions` VALUES ('29', 'admin.buildtype.index', '楼盘类型列表', '', '2016-10-18 16:11:02', '2016-10-18 16:11:02', '21', null);
--INSERT INTO `permissions` VALUES ('30', 'admin.buildtype.edit', '修改楼盘类型', '', '2016-10-18 16:27:46', '2016-10-18 16:27:57', '21', null);
--INSERT INTO `permissions` VALUES ('31', 'admin.buildtype.create', '添加楼盘类型', '', '2016-10-18 16:35:44', '2016-10-18 16:35:44', '21', null);
--  ---------------


-- ----------------------------
-- Table structure for permission_role
-- ----------------------------
DROP TABLE IF EXISTS `permission_role`;
CREATE TABLE `permission_role` (
  `permission_id` int(10) unsigned NOT NULL,
  `role_id` int(10) unsigned NOT NULL,
  PRIMARY KEY (`permission_id`,`role_id`),
  KEY `permission_role_role_id_foreign` (`role_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- ----------------------------
-- Records of permission_role
-- ----------------------------

-- ----------------------------
-- Table structure for roles
-- ----------------------------
DROP TABLE IF EXISTS `roles`;
CREATE TABLE `roles` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `display_name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `description` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `roles_name_unique` (`name`)
) ENGINE=MyISAM AUTO_INCREMENT=5 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- ----------------------------
-- Records of roles
-- ----------------------------

-- ----------------------------
-- Table structure for role_user
-- ----------------------------
DROP TABLE IF EXISTS `role_user`;
CREATE TABLE `role_user` (
  `user_id` int(10) unsigned NOT NULL,
  `role_id` int(10) unsigned NOT NULL,
  PRIMARY KEY (`user_id`,`role_id`),
  KEY `role_user_role_id_foreign` (`role_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- ----------------------------
-- Records of role_user
-- ----------------------------

-- ----------------------------
-- Table structure for users
-- ----------------------------
DROP TABLE IF EXISTS `users`;
CREATE TABLE `users` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `password` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `remember_token` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `users_email_unique` (`email`)
) ENGINE=MyISAM AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- ----------------------------
-- Records of users
-- ----------------------------

-- ----------------------------
--  Records of `wx_user`
-- ----------------------------
INSERT INTO `wx_user` VALUES
 ( '1',
  'outNRwqwBOzxHAr2u8ex8fCXkzcE',
  'costa92',
   '',
   '',
   '1',
   'http://wx.qlogo.cn/mmopen/bW1nJNV12whBvib8tR30HZhMDeqQML78cTUWpiblQP8FlCUZBhxtaHLPibLAK59vz4c96nHBXhbVyfMH8fZUbqkgXlsGmSXib8iap/0',
    '长沙',
     '湖南',
     '中国',
      '1476687662',
      null);


-- ----------------------------
--  Records of `areas`
-- ----------------------------
INSERT INTO `areas` VALUES ('1', '岳麓区', null);

-- ----------------------------
--  Records of `build_types`
-- ----------------------------
INSERT INTO `build_types` VALUES ('1', '精装', null);

